package 笔试题.yingtailai;

import java.util.Scanner;

public class 摆糖 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        int i = 1;
        int count = 0;
        while (n > 0) {
            n -= i;
            count++;
            i++;
        }
        System.out.println(count);
    }
}
